package com.example.JavaDemo.service.impl;



import com.example.JavaDemo.Mapper.ResidentMapper;
import com.example.JavaDemo.domain.Resident;
import com.example.JavaDemo.service.IResidentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResidentServiceImpl implements IResidentService {
    @Autowired
    private ResidentMapper residentMapper;


    /**
     * 查询住户
     * @param resident
     * @return
     */
    @Override
    public List<Resident> selectResident(Resident resident) {
        return residentMapper.selectResident(resident);
    }

    /**
     * 新增住户
     * @param resident
     */
    @Override
    public void insertResident(Resident resident) {
        residentMapper.insertResident(resident);
    }

    /**
     * 修改住户
     * @param resident
     */
    @Override
    public void updateResidentById(Resident resident) {
        residentMapper.updateResidentById(resident);
    }

    /**
     * 删除住户
     * @param residentId
     */
    @Override
    public void delResidentById(String residentId) {
        residentMapper.delResidentById(residentId);
    }

}
